<template>
  <view class="tab-content">
    <view class="l-title"> 宣传标语 </view>
    <nut-textarea v-model="tmp.slogan" placeholder="请输入30字内的房源标语 内容将显示于房源置顶及宣传海报" @change="change1"/>
    <view class="l-title"> 房源评价 </view>
    <nut-textarea v-model="tmp.describe" placeholder="" @change="change2"/>
  </view>
</template>
<script>  
import Taro, { useReady,getCurrentInstance} from '@tarojs/taro' 
export default { 
 data() {
    return {
      tmp:{ }, 
    }
  },
  created(){
    var { slogan , describe} = this.$store.state.publishInfo
    this.tmp  = { slogan , describe}
  },
  mounted(){ 
      console.log(this.tmp);
  },
  methods:{
      change1(value,event){
        this.tmp.slogan = value 
        this.$store.dispatch("asyncTmp",this.tmp);
      },
      change2(value,event){
        this.tmp.describe = value
        this.$store.dispatch("asyncTmp",this.tmp);
      }
  }
}
</script>  
<style lang="less">
textarea{
  padding: 10px !important;
  border: 1px solid #ccc !important;
  border-radius: 10px !important;
  height: 100px !important;
  margin-top: 10px !important;
}
.nut-textarea{
 padding: 1px 10px 10PX 1px !important; 
}
</style>